﻿Public Class frmPwdModify

    Private Sub cmdOK_Click(sender As Object, e As EventArgs) Handles cmdOK.Click
        If txtpassword1.Text = "" Then
            MsgBox("未输入密码")
        End If
        If Trim(txtpassword1.Text) <> Trim(txtpassword2.Text) Then
            MsgBox("输入密码不一致!", vbOKOnly, "警告")
        Else
            Dim icount As Integer
            txtSQL = "UPDATE 用户 SET 密码 = '" & txtpassword1.Text & " 'WHERE 用户名='" & username_OK & " '"
            icount = ExecuteSQL(txtSQL, ErrorMsg)
            If icount = 1 Then
                MsgBox("密码修改成功", vbOKOnly, "修改密码")
            Else
                MsgBox("密码修改失败", vbOKOnly, "修改密码")
            End If
        End If
    End Sub

    Private Sub cmdexit_Click(sender As Object, e As EventArgs) Handles cmdexit.Click
        Me.Close()
    End Sub

    Private Sub frmPwdModify_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class